package com.community.service.impl;

import com.community.mapper.UserElderlyHealthMapper;
import com.community.pojo.ElderlyHealth;
import com.community.service.UserElderlyHealthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserElderlyHealthServiceImpl implements UserElderlyHealthService {
    private final UserElderlyHealthMapper userElderlyHealthMapper;
    @Autowired
    public UserElderlyHealthServiceImpl(UserElderlyHealthMapper userElderlyHealthMapper) {
        this.userElderlyHealthMapper = userElderlyHealthMapper;
    }
    public ElderlyHealth findUserHealthInformation(Integer userId){
        return userElderlyHealthMapper.findUserHealthInformation(userId);
    }
    public int updateUserHealthInofrmation(ElderlyHealth elderlyHealth){
        return userElderlyHealthMapper.updateUserHealthInofrmation(elderlyHealth);
    }
    public int insertUserHealthInformation(ElderlyHealth elderlyHealth){
        return userElderlyHealthMapper.insertUserHealthInformation(elderlyHealth);
    }
}
